#include <gtest/gtest.h>
#include "base/Mem.h"

#define CHECK_RESULT(result) \
do{ if((result)!= 0) \
    {   \
        printf("this is a bug\n");\
        break;\
}}while(0)


TEST(MacroTest, break_in_macro_is_not_bug)
{
    bool results[3]={ true, false, true};
    int loop = 0;
    for(; loop < 3; loop ++)
    {
        CHECK_RESULT(results[loop]);
    }
    ASSERT_TRUE(loop == 3);
}



